import axios from 'axios'

export interface Post{
    userId:number;
    id:number;
    title:string;
    body:string
}

const DummyRequest = (id:number):Promise<Post> =>{
    return axios({
        method:"GET",
        url:`https://jsonplaceholder.typicode.com/posts/${id}`
    }).then(response =>{
        return {...response.data};
    });
}

export default DummyRequest;
